package com.csis.system.domain;

import static com.csis.system.common.IStaticData.COLUMN_WAREHOUSE_WAREID;
import static com.csis.system.common.IStaticData.COLUMN_WAREHOUSE_WARENAME;
import static com.csis.system.common.IStaticData.COLUMN_WAREHOUSE_WARENOTE;
import static com.csis.system.common.IStaticData.TABLE_WAREHOUSE;

import java.util.LinkedHashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

@Entity
@Table(name = TABLE_WAREHOUSE)
public class Warehouse {
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = COLUMN_WAREHOUSE_WAREID)
	private java.lang.Integer id = null;
	@Column(name = COLUMN_WAREHOUSE_WARENAME)
	private java.lang.String wareName = null;
	@Column(name = COLUMN_WAREHOUSE_WARENOTE)
	private java.lang.String wareNote = null;

	@ManyToMany(cascade = { CascadeType.MERGE }, mappedBy = "wares", fetch = FetchType.EAGER)
	private Set<User> users = new LinkedHashSet<User>();


	public java.lang.Integer getId() {
		return id;
	}

	public void setId(java.lang.Integer wareId) {
		this.id = wareId;
	}

	public java.lang.String getWareName() {
		return wareName;
	}

	public void setWareName(java.lang.String wareName) {
		this.wareName = wareName;
	}

	public java.lang.String getWareNote() {
		return wareNote;
	}

	public void setWareNote(java.lang.String wareNote) {
		this.wareNote = wareNote;
	}

	public Set<User> getUsers() {
		return users;
	}

	public void setUsers(Set<User> users) {
		this.users = users;
	}

}
